<template>
        <div class="mui-numbox" data-numbox-min='1'>
					<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
					<input id="test" class="mui-input-numbox" @change="numChanged" ref="numBox" type="number" value="1" />
					<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
		</div>  
</template>
<script>
import mui from "../../lib/mui/mui-master/dist/js/mui.min.js";
export default {
    props:["max"],
    data(){
        return{}
    },
    mounted(){
        mui(".mui-box").numbox();
    },
    // watch:{
    //    "max":function(newValue,oldValue){
    //       mui(".mui-box").numbox().setOption("max",newValue) 
    //        console.log(newValue);
    //    }
    // },
    methods:{
        numChanged(){
            this.$emit("sellCount",parseInt(this.$refs.numBox.value));
        }
    }
}
</script>
<style>

</style>


